import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const startDate2 = '';
export const endDate2 = '';
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "viewBtn": true,
  editBtn: false,
  delBtn: false,
  selection: true,
  emptyBtn:false,
  // selectable: (row)=>{
  //   // 线网添加且未通知
  //   return row.dataSource=='0'&&row.noticeStatus=='0'
  // },
  "column": [{
    "type": "input",
    "label": "唯一标识",
    "prop": "id",
    "hide": true,
    "display": false
  }, {
    "type": "select",
    "label": "线路",
    "prop": "lineCode",
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/support/swparamline/dict",
    search: true,
    display: false
  }, {
    "type": "select",
    "label": "车站",
    "prop": "stationCode",
    props: {
    	label: 'name',
    	value: 'code'
    },
    dicFlag: false,
    dicUrl: "/support/swparamstation/dict/{{key}}",
    search: true,
    display: false
  }, {
    "type": "input",
    "label": "回收人",
    "prop": "receivePersonName",
    "display": false
  }, {
    "type": "input",
    "label": "回收人工号",
    "prop": "receivePersonCode",
    "display": false
  },{
    "type": "input",
    "label": "回收人2",
    "prop": "receivePersonTwoName",
    "display": false
  }, {
    "type": "input",
    "label": "回收人2工号",
    "prop": "receivePersonTwoCode",
    "display": false
  }, {
    "type": "date",
    "label": "回收时间",
    "prop": "receiveTime",
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    "display": false,
    search: true,
    searchValue: [startDate, endDate],
    searchRange: true,
    searchSpan: 12
  }, {
    "type": "select",
    "label": "上交人",
    "prop": "handPersonName",
    component: 'user-select',
    params: {
      userCodeKey: 'handPersonCode',
      belongToStation: true
    },
    "display": false
  }, {
    "type": "input",
    "label": "上交人工号",
    "prop": "handPersonCode",
    disabled: true,
    "display": false
  }, {
    "type": "number",
    "label": "上交数量",
    "prop": "handCount",
    "display": false
  }, {
    "type": "datetime",
    "label": "上交时间",
    "prop": "handTime",
    "format": 'yyyy-MM-dd',
    "valueFormat": 'yyyy-MM-dd HH:mm:ss',
    "display": false,
    search: true,
    searchslot:true,
    // searchRange: true,
    searchSpan: 12
  }, {
    label: '差异数量',
    prop: 'differenceCount',
    display: false
  }, {
    label: '数据来源',
    prop: 'dataSource',
    type: "select",
    dicData: [{
      label: '线网',
      value: '0'
    }, {
      label: '车站',
      value: '1'
    }, {
      label: '临时配收计划',
      value: '2'
    }],
    search: true,
    "display": false
  }, {
    "type": "select",
    "label": "状态",
    "prop": "handStatus",
    "display": false,
    search: true,
    searchValue:'0',
    dicUrl: '/admin/dict/type/sw_st_ticket_hand_status'
  },{
    "type": "select",
    "label": "通知状态",
    "prop": "noticeStatus",
    "display": false,
    dicData: [{
      label: '未通知',
      value: '0'
    }, {
      label: '已通知',
      value: '1'
    }]
  }, {
    label: '是否入库',
    prop: 'isInstock',
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    dicData: [{
      label: '否',
      value: '0'
    }, {
      label: '是',
      value: '1'
    }],
    display: false
  }, {
    label: '是否出库',
    prop: 'isOutstock',
    type: 'select',
    search: true,
    searchLabelWidth: 100,
    dicData: [{
      label: '否',
      value: '0'
    }, {
      label: '是',
      value: '1'
    }],
    display: false
  }, {
    "type": "textarea",
    "label": "备注",
    "prop": "remark",
    "display": false
  }, {
    "type": "textarea",
    "label": "驳回原因",
    "prop": "rejectReply",
    "display": false
  }, {
    "type": "input",
    "label": "部门ID",
    "prop": "deptId",
    "hide": true,
    "display": false
  }, {
    "type": "input",
    "label": "创建人ID",
    "prop": "creatorId",
    "hide": true,
    "display": false
  }, {
    "type": "input",
    "label": "创建人名称",
    "prop": "creatorName",
    "hide": true,
    "display": false
  }, {
    "type": "input",
    "label": "创建时间",
    "prop": "createTime",
    "hide": true,
    "display": false
  }, {
    "type": "input",
    "label": "修改时间",
    "prop": "updateTime",
    "hide": true,
    "display": false
  }],
  group: [{
    label: '回收信息摘要',
    display: true,
    column: [{
      "type": "select",
      "label": "线路",
      "prop": "lineCode",
      cascaderItem: ["stationCode"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      rules: [{
        required: true,
        message: '请选择线路'
      }],
      //display: false,
      editDisabled: true
    }, {
      "type": "select",
      "label": "车站",
      "prop": "stationCode",
      props: {
        label: 'name',
        value: 'code'
      },
      dicFlag: false,
      dicUrl: "/support/swparamstation/dict/{{key}}",
      rules: [{
        required: true,
        message: '请选择车站'
      }],
      // display: false,
      editDisabled: true
    }, {
      "type": "select",
      "label": "回收人",
      "prop": "receivePersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'receivePersonCode'
      },
      rules: [{
        required: true,
        message: '请选择回收人'
      }],
      //disabled: true
    }, {
      "type": "input",
      "label": "回收人工号",
      "prop": "receivePersonCode",
      //disabled: true
    },{
      "type": "select",
      "label": "回收人2",
      "prop": "receivePersonTwoName",
      component: 'user-select',
      params: {
        userCodeKey: 'receivePersonTwoCode'
      },
      rules: [{
        required: true,
        message: '请选择回收人2'
      }]
    }, {
      "type": "input",
      "label": "回收人2工号",
      "prop": "receivePersonTwoCode",
      disabled: true
    }, {
      "type": "date",
      "label": "回收时间",
      "prop": "receiveTime",
      "format": 'yyyy-MM-dd',
      "valueFormat": 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择回收时间'
      }]
    }]
  }, {
    label: '上交信息摘要',
    display: false,
    column: [{
      "type": "input",
      "label": "上交人",
      "prop": "handPersonName",
      disabled: true
    }, {
      "type": "input",
      "label": "上交人工号",
      "prop": "handPersonCode",
      disabled: true
    }, {
      "type": "date",
      "label": "上交时间",
      "prop": "handTime",
      "format": 'yyyy-MM-dd',
      "valueFormat": 'yyyy-MM-dd HH:mm:ss',
      disabled: true
    }]
  }, {
    column: [{
      prop: 'swStTicketHandDetails',
      labelWidth: 0,
      formslot: true,
      span: 24
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      span: 24
    }, {
      type: "textarea",
      label: "驳回原因",
      prop: "rejectReply",
      span: 24,
      display: true
    }]
  }, {
    label: '线网反馈信息',
    //display: false,
    column: [{
      label: '反馈信息',
      prop: 'feedback',
      type: 'textarea',
      span: 24,
    }, {
      label: '调查结果',
      prop: 'stationSurveyResult',
      type: 'textarea',
      span: 24,
      disabled: true
    }]
  }, {
    label: '申诉信息',
    //display: false,
    column: [{
      label: '申诉信息',
      prop: 'complain',
      type: 'textarea',
      editDisabled: true,
      span: 24
    }, {
      label: '调查结果',
      prop: 'lineSurveyResult',
      type: 'textarea',
      editDisplay: true,
      span: 24
    }]
  }]
}


export const appealOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  "viewBtn": true,
  editBtn: false,
  delBtn: false,
  selection: true,
  submitBtn: false,
  emptyBtn:false,
  group: [{
    label: '回收信息摘要',
    display: true,
    column: [{
      "type": "select",
      "label": "线路",
      "prop": "lineCode",
      cascaderItem: ["stationCode"],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: "/support/swparamline/dict",
      rules: [{
        required: true,
        message: '请选择线路'
      }],
      disabled: true
    }, {
      "type": "select",
      "label": "车站",
      "prop": "stationCode",
      props: {
        label: 'name',
        value: 'code'
      },
      dicFlag: false,
      dicUrl: "/support/swparamstation/dict/{{key}}",
      rules: [{
        required: true,
        message: '请选择车站'
      }],
      disabled: true
    }, {
      "type": "select",
      "label": "回收人",
      "prop": "receivePersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'receivePersonCode'
      },
      rules: [{
        required: true,
        message: '请选择回收人'
      }],
      disabled: true
    }, {
      "type": "input",
      "label": "回收人工号",
      "prop": "receivePersonCode",
      disabled: true
    },{
      "type": "select",
      "label": "回收人2",
      "prop": "receivePersonTwoName",
      component: 'user-select',
      params: {
        userCodeKey: 'receivePersonTwoCode'
      },
      rules: [{
        required: true,
        message: '请选择回收人2'
      }],
      disabled: true
    }, {
      "type": "input",
      "label": "回收人2工号",
      "prop": "receivePersonTwoCode",
      disabled: true
    }, {
      "type": "date",
      "label": "回收时间",
      "prop": "receiveTime",
      "format": 'yyyy-MM-dd',
      "valueFormat": 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择回收时间'
      }],
      disabled: true
    }]
  }, {
    label: '上交信息摘要',
    display: false,
    column: [{
      "type": "input",
      "label": "上交人",
      "prop": "handPersonName",
      disabled: true
    }, {
      "type": "input",
      "label": "上交人工号",
      "prop": "handPersonCode",
      disabled: true
    }, {
      "type": "date",
      "label": "上交时间",
      "prop": "handTime",
      "format": 'yyyy-MM-dd',
      "valueFormat": 'yyyy-MM-dd HH:mm:ss',
      disabled: true
    }]
  }, {
    column: [{
      prop: 'swStTicketHandDetails',
      labelWidth: 0,
      formslot: true,
      span: 24
    }, {
      label: '备注',
      prop: 'remark',
      type: 'textarea',
      span: 24,
      disabled: true
    }]
  }, {
    label: '线网反馈信息',
    //display: false,
    column: [{
      label: '反馈信息',
      prop: 'feedback',
      type: 'textarea',
      span: 24,
      disabled: true
    }, {
      label: '调查结果',
      prop: 'stationSurveyResult',
      type: 'textarea',
      span: 24,
      disabled: true
    }]
  }, {
    label: '申诉信息',
    //display: false,
    column: [{
      label: '申诉信息',
      prop: 'complain',
      type: 'textarea',
      disabled: true,
      span: 24
    }, {
      label: '调查结果',
      prop: 'lineSurveyResult',
      type: 'textarea',
      span: 24
    }]
  }]
}
